#ifndef DEVICE_INDEX_BUFFER_DX9_H
#define DEVICE_INDEX_BUFFER_DX9_H

#include "../inc/buffer.h"
#include "D3DHeader.h"

namespace Graphic
{
	class IndexBufferDX9 : public IndexBuffer
	{
	public:
		IndexBufferDX9(D3D9IndexBuffer* pIB, int size, const char* data);
		~IndexBufferDX9(){};

	public:
		virtual bool IsValid();
		virtual int	 GetHandle();
		virtual void Release();

		virtual void	Upload(const char* data, int size);
		virtual void*	Lock(int usage);
		virtual void	Unlock();
		virtual int		GetSize();
	private:
		D3D9IndexBuffer* m_pBuffer;
		int	m_nSize;
		bool m_bIsValid;
	};
}

#endif